<route lang="yaml">
  meta:
    enabled: false
  </route>

<script setup lang="ts">
interface RowVO {
  no: string
  name: string
  phone: string
  address: string
  status: number
  createTime: string
  expressNo: string
}

const tableData = ref<RowVO[]>([
  { no: 10001, name: '李四', phone: '156****7754', address: '广东省深圳市宝安区西乡街道航城路2206号', status: 1, createTime: '2025-04-06 12:11:56', expressNo: 'JD24654824' },
  { no: 10002, name: '李四', phone: '156****7754', address: '广东省深圳市宝安区西乡街道航城路2206号', status: 1, createTime: '2025-04-06 12:11:56', expressNo: 'JD24654824' },
])
</script>

<template>
  <div>
    <FaPageHeader title="订单管理">
      <SearchBar :fold="false" :show-toggle="true" />
    </FaPageHeader>
    <FaPageMain>
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="no" label="订单号" width="100" />
        <el-table-column prop="name" label="收货人" width="120" />
        <el-table-column prop="phone" label="手机号" width="120" />
        <el-table-column prop="address" label="收货地址" width="300" />
        <el-table-column prop="status" label="订单状态" width="120">
          <template #default="scope">
            <span v-if="scope.row.status === 1">待发货</span>
            <span v-if="scope.row.status === 2">已发货</span>
            <span v-if="scope.row.status === 3">已签收</span>
            <span v-if="scope.row.status === 4">已售后</span>
          </template>
        </el-table-column>
        <el-table-column prop="expressNo" label="快递单号" width="120" />
        <el-table-column prop="createTime" label="下单时间" width="180" />
      </el-table>
    </FaPageMain>
    <FaPagination :page="1" :size="10" :total="10" />
  </div>
</template>
